// import { mapActions } from 'vuex';

export default {
	props: {
		title: {
			type: String,
			default: ''
		},
		titleLabel: {
			type: String,
			default: ''
		},
		src: {
			type: String,
			default: null
		},
		dSrc: {
			type: String,
			default: null
		},
		discount: {
			type: String,
			default: ''
		},
		originalPrice: {
			type: String,
			default: ''
		},
		price: {
			type: String,
			default: ''
		},
		entrance: {
			type: String,
			default: ''
		}
	},
	methods: {
		// ...mapActions(["addUserCartListAsync"]),
		navigateTo(entrance) {
			if (!entrance) return
			uni.navigateTo({
				url: '/pages/detail/detail?' + entrance.split('?')[1]
			})
		},
		// addToCart(item) {
		// 	console.log('加入购物车...')
		// 	this.addUserCartListAsync({pId: item.productClusterId})
		// }
	}
}